package com.jy.rhin.domain.notification.publish;

import com.jy.rhin.domain.notification.publish.entity.PublishMessageDO;
import com.jy.rhin.domain.notification.publish.entity.PublishMessageStatisticsDO;

import java.util.Date;
import java.util.List;

/**
 * @author WeiQ
 * @date 2022/6/29 17:07
 */
public interface PublishMessageDao {

    /**
     * 批量保存发布消息记录
     * @param records
     */
    void save(List<PublishMessageDO> records);

    /**
     * 保存发布消息记录
     * @param publishMessage
     */
    void save(PublishMessageDO publishMessage);

    /**
     * 根据id查询发布记录
     * @param subscribeId
     * @return
     */
    PublishMessageDO queryById(Long subscribeId);

    /**
     * 重置对应时间段的消息发送统计
     * @param startDate
     * @param endDate
     */
    void resetStatistics(Date startDate, Date endDate);

    /**
     *保存消息通知数量
     * @param publishMessageStatisticsDO
     */
    void saveStatistics(PublishMessageStatisticsDO publishMessageStatisticsDO);

}
